<?php
/**
 * The loop that displays posts.
 *
 * The loop displays the posts and the post content.  See
 * http://codex.wordpress.org/The_Loop to understand it and
 * http://codex.wordpress.org/Template_Tags to understand
 * the tags used in it.
 *
 * This can be overridden in child themes with loop.php or
 * loop-template.php, where 'template' is the loop context
 * requested by a template. For example, loop-index.php would
 * be used if it exists and we ask for the loop with:
 * <code>get_template_part( 'loop', 'index' );</code>
 *
 * @package WordPress
 * @subpackage Twenty_Ten
 * @since Twenty Ten 1.0
 */
?>

<?php /* Display navigation to next/previous pages when applicable */ ?>

<?php /* If there are no posts to display, such as an empty archive page */ ?>
<?php if ( ! have_posts() ) :  ?>
	<div id="post-0" class="post error404 not-found">
		<h1 class="entry-title"><?php _e( 'Not Found', 'twentyten' ); ?></h1>
		<div class="entry-content">
			<p><?php _e( 'Apologies, but no results were found for the requested archive. Perhaps searching will help find a related post.', 'twentyten' ); ?></p>
			<?php get_search_form(); ?>
		</div><!-- .entry-content -->
	</div><!-- #post-0 -->
<?php endif; ?>

<?php
	/* Start the Loop.
	 *
	 * In Twenty Ten we use the same loop in multiple contexts.
	 * It is broken into three main parts: when we're displaying
	 * posts that are in the gallery category, when we're displaying
	 * posts in the asides category, and finally all other posts.
	 *
	 * Additionally, we sometimes check for whether we are on an
	 * archive page, a search page, etc., allowing for small differences
	 * in the loop on each template without actually duplicating
	 * the rest of the loop that is shared.
	 *
	 * Without further ado, the loop:
	 */ ?>

	<?php if(have_posts()) : while (have_posts()) : the_post(); ?>

    <div class="content_text"> 
    <div class="title"> 
    <a href="<?php the_author_meta('user_url'); ?>" class="avatar"><?php echo get_avatar( get_the_author_meta('user_email'), '43', '' ); ?>"<span><?php echo get_avatar( get_the_author_meta('user_email'), '43', '' ); ?>"</span></a> 
    <i class="line_h"></i> 
    <h3><a href="<?php the_permalink() ?>" rel="bookmark" title="<?php the_title_attribute(); ?>"><?php the_title(); ?></a></h3> 
    <p><?php the_author_posts_link(); ?> / <?php the_category(',') ?> / <?php the_time('Y年m月d日'); ?> / 浏览:<?php if(function_exists('the_views')) { the_views(); } ?></p> 
    <span class="comments"><?php comments_popup_link('0', '1', '%', 'up'); ?></span>
    </div> 
    <!--content_banner--> 
    <div class="content_banner"> 
    

	<?php get_img_link($post); ?>

    <div class="text">
    <?php the_content(); ?>
    </div> 
    </div> 
    <!--toolBar--> 
    <div class="toolBar"> 
    <a href="<?php the_permalink() ?>" class="more">阅读全文</a>    </div> 
</div> 
    <!--content_text End--> 
 		<?php endwhile; endif; ?>
<?php if ( $wp_query->max_num_pages > 1 ) : ?>
<div class="pagenavi"><?php pagenavi(); ?></div>
<?php endif; ?>
